﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StockImport.dataimport.otc.dailyindex;
using System.Net;

namespace StockImport.http
{
    public class UrlGet
    {
        public static UpdateResult process(String url)
        {
            UpdateResult result = new UpdateResult();
            result.setRequest(url);

            using (WebClient client = new WebClient())
            {
                try
                {
                    String content = client.DownloadString(url);
                    result.setUrlResult(true);
                    result.setContent(content);
                }
                catch (Exception e)
                {
                    result.setMessage(e.Message);
                }
                finally
                {

                }
            }
            return result;
        }

    }
}
